Sample vMR Interaction
V2010-09-01

Input:
	CCD (details TBD)
	
Transformed into vMR

Example vMR Objects (to run rule: patient has beta agonist overuse)
-- most optional data omitted
Note:  TypeCodes, OIDs, and TemplateId values are specified by ISO, HL7 CCD, IHE, and C32/C83 etc., and are not accurate below

Patient model after processing by DSS at an evalTime of 2010-08-31T00:00:00
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2010 rel. 3 sp1 (http://www.altova.com)-->
<v3:vMR xsi:schemaLocation="urn:hl7-org:v3 VMR_DataTypes_v03.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:v3="urn:hl7-org:v3">
	<v3:Patient>
		<v3:EntityTypeCode codeSystem="1.2.3..." displayName="Person" codeSystemName="HL7" code="PRSN"/>
		<v3:id extension="10001" assigningAuthorityName="XYZ Clinic" root="<XYZ Clinic root OID>.1"/>
		<v3:administrativeGender>F</v3:administrativeGender>
		<v3:birthTime>1960-08-31T00:00:00</v3:birthTime>
		<v3:ageInYears>50.0</v3:ageInYears>
		<v3:ageInMonths>600.0</v3:ageInMonths>
		<v3:ageInWeeks>2609.0</v3:ageInWeeks>
		<v3:ageInDays>18263</v3:ageInDays>
		<v3:ageInHours>438312</v3:ageInHours>
	</v3:Patient>
	<v3:Encounter>
		<v3:id extension="20001" assigningAuthorityName="XYZ Clinic" root="<XYZ Clinic root OID>.1.2"/>
		<v3:templateId>1.2.3...</v3:templateId>
		<v3:typeCode codeSystem="1.2.3..." displayName="Medical Encounter" codeSystemName="LOINC" code="LOINC_CODE_FOR_ENCOUNTER"/>
		<v3:isBillingData>true</v3:isBillingData>
		<v3:encounterType codeSystem="0" displayName="a" codeSystemName="a" code="!"/>
		<v3:effectiveTime start="2010-02-01T00:00:00" end="2010-02-01T00:00:00"/>
		<v3:encounterStatus>Completed</v3:encounterStatus>
	</v3:Encounter>
	<v3:Procedure>
		<v3:id extension="60001" assigningAuthorityName="ABC Radiology" root="<XYZ Clinic root OID>.32.6"/>
		<v3:typeCode codeSystem="1.2.3..." displayName="Perform a medical procedure" codeSystemName="LOINC" code="LOINC_CODE_FOR_PROCEDURE"/>
		<v3:isBillingData>true</v3:isBillingData>
		<v3:procedureCode codeSystem="1.2.3..." displayName="Mammogram, bilateral" codeSystemName="CPT code="CPT  code for mammogram""/>
		<v3:performedTime start="2010-02-01T00:00:00" end="2010-02-01T00:00:00"/>
		<v3:statusCode>completed</v3:statusCode>		
	</v3:Procedure>
	<v3:Problem>
		<v3:id extension="40001" assigningAuthorityName="XYZ Clinic" root="<XYZ Clinic root OID>.1.4"/>
		<v3:templateId>1.2.3...</v3:templateId>
		<v3:typeCode codeSystem="1.2.3..." displayName="Problem List" codeSystemName="LOINC" code="LOINC_CODE_FOR_PROBLEM_LIST"/>
		<v3:isBillingData>true</v3:isBillingData>
		<v3:relatedClinicalStatement relationshipType="EncounterContains">
			<v3:id extension="20001" assigningAuthorityName="XYZ Clinic" root="<XYZ Clinic root OID>.1.2"/>
		</v3:relatedClinicalStatement>
		<v3:problemCode codeSystem="1.2.3..." displayName="Chronic obstructive asthma with status asthmaticus" codeSystemName="ICD9" code="493.21"/>
		<v3:problemEffectiveTime start="1962" end=""/>
		<v3:problemStatementTime start="2010-02-01T00:00:00" end="2010-02-01T00:00:00"/>
		<v3:problemStatus>Active</v3:problemStatus>
		<v3:priority>1</v3:priority>
		<v3:severity>Severe</v3:severity>
		<v3:bodySite codeSystem="0" displayName="Lungs" codeSystemName="a" code="!"/>
	</v3:Problem>
	<v3:Medication>
		<v3:id extension="80001" assigningAuthorityName="CVS Pharmacy" root="<CVS Pharmacy root OID>.1.1"/>
		<v3:templateId>1.2.3...</v3:templateId>
		<v3:typeCode codeSystem="1.2.3..." displayName="Medication" codeSystemName="LOINC" code="LOINC_CODE_FOR_MEDICATION"/>
		<v3:isBillingData>true</v3:isBillingData>
		<v3:typeOfSubstance>String</v3:typeOfSubstance>
		<v3:substanceGenericCode codeSystem="<RXTerms OID>" displayName="Salmeterol Inhaler" codeSystemName="RXTerms" code="70001"/>
		<v3:productForm>INHALER</v3:productForm>
		<v3:doseQuantity originalText="two puffs" value="2.0" unit="puffs"/>
		<v3:routeCode>PO</v3:routeCode>
		<v3:approachSiteCode codeSystem="0" displayName="Oral" codeSystemName="a" code="!"/>
		<v3:deliveryMethod originalText="Inhalation" value="0.0" unit="!"/>
		<v3:frequency>
			<v3:period originalText="q2h PRN" value="2.0" unit="hours"/>
			<v3:intervalIsImportant>true</v3:intervalIsImportant>
		</v3:frequency>
		<v3:doseRestriction originalText="no more than qid" value="4.0" unit="daily"/>
		<v3:administrationTiming start="2010-02-01T00:00:00" end="2011-02-01T00:00:00"/>
		<v3:substanceBrandCode codeSystem="<NDC OID>" displayName="Serevent 60 Puff Inhaler" codeSystemName="NDC" code="90001"/>
		<v3:statusOfSubstanceAdmin>active</v3:statusOfSubstanceAdmin>
		<v3:medicationClass codeSystem="<Generic Class Code OID>" displayName="Beta Agonist" codeSystemName="GC3" code="J5D"/>
	</v3:Medication>

</v3:vMR>

Q: what are the intermediate states we care about?  How do we want to represent them?
- Gender --> irrelevant
- Age    --> irrelevant
- No Dx COPD
- Hx ED or IP visit with Dx Chronic Asthma in last year
- Hx OP visit
Options
	Observation that patient does not have mastectomy, dated today
	Clinical State Assertion that patient does not have mastectomy, dated today
	Concept/State of "at least one breast remains partially" (or "breast tissue is present"), value = true, date evaluated = today, associated relevant clinical statements (preferentially use SNOMED CT)
	
	Operationally for last option:
		LHS
			Look for Procedures and Observations for mastectomies, determine if patient has at least one breast partially
		RHS
			Insert Observation
				Code = SNOMED CT for "has at least one breast partially" (or "breast tissue is present")
				Date = now
				Value = true
	
	When using this in a subsequent rule (clinicians view):
		LHS
			if (most recent observation for SNOMED CT concept "has at least one breast partially" (or "breast tissue is present") == true)
			etc.
		RHS
	
	Key: 
		rule writer here would need to know that this SNOMED CT concept is one that is available for use
		need to make sure Guvnor allows expression of the type above easily
		
- Another example for Problem observation that patient has diabetes:
		Source data:
			Problem of SNOMED CT XYZ 2010-08-01, Active
		
		LHS	
			Look for Problems of relevant SNOMED CT codes, etc.
		RHS
			Insert Problem
				Code = SNOMED CT for "diabetes mellitus"
				Status = Active
				Date = now
		When using:
		LHS
			Look for Problem, SNOMED CT code for "diabetes mellitus", most recent
			If status = Active
			
				
	
- Last mammogram 2/1/2010, ID = X
	Prior Procedure as is --> would be hard for naive user to make use of
	Observation
		Code = "LastMammogramExists" concept
		Value = true
		Related Clinical Statement: Procedure, relation type = referred to CS
	Concept of "at least one breast remains partially", value = true, date evaluated = today, associated relevant clinical statements (preferentially use SNOMED CT)	
		
	


	
